package com.zhijian.wharf.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author HCG
 * @version 1.0
 * @date 2024-08-18
 */
public class AisEnum {

    /**
     * 风向枚举类
     *
     * @author HCG
     * @version 1.0
     * @date 2024-07-24
     */
    @AllArgsConstructor
    @Getter
    public enum NavigationStatusEnum {

        ZERO("0", "发动机使用中"),
        ONE("1", "锚泊"),
        TWO("2", "未操纵"),
        THREE("3", "有限适航性"),
        FOUR("4", "受船舶吃水限制"),
        FIVE("5", "系泊"),
        SIX("6", "搁浅"),
        SEVEN("7", "从事捕捞"),
        EIGHT("8", "航行中"),
        NINE("9", "留做将来修正导航状态，用于载运危险品（DG）、有害物质（HS）或海洋污染物（MP）的船舶，或载运IMO的C类危险品或污染物、高速船（HSC）"),
        TEN("10", "留做将来修正导航状态，用于载运DG、HS或MP，或载运IMO的A类危险品或污染物的船舶，WIG"),
        TEN_1("11", "机动船尾推作业（区域使用）"),
        TEN_2("12", "机动船顶推或侧推作业（区域使用）"),
        TEN_3("13", "留做将来用"),
        TEN_4("14", "AIS-SART（现行的）、MOB-AIS、EPIRB-AIS"),
        TEN_5("15", "未规定=默认值（也用于测试中的AIS-SART、MOB-AIS和EPIRB-AIS）"),
        ;

        private String code;
        private String content;

        public static NavigationStatusEnum getByCode(String code) {
            NavigationStatusEnum[] values = NavigationStatusEnum.values();
            for (NavigationStatusEnum anEnum : values) {
                if (anEnum.getCode().equals(code)) {
                    return anEnum;
                }
            }
            return null;
        }

    }
}
